package models;

import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.NotEmpty;

/**
 * The model used for login actions.
 * 
 * @author hoannguyen
 * 
 */
public class LoginModel {

	@NotEmpty
	@Size(min = 1, max = 10)
	private String userName;

	@NotEmpty
	@Size(min = 1, max = 10)
	private String password;

	/**
	 * @return the userName
	 */
	public String getUserName() {
		return userName;
	}

	/**
	 * @param userName
	 *            the userName to set
	 */
	public void setUserName(String userName) {
		this.userName = userName;
	}

	/**
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * @param password
	 *            the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * 
	 */
	public LoginModel() {
		super();
	}

	/**
	 * @param userName
	 * @param password
	 */
	public LoginModel(String userName, String password) {
		super();
		this.userName = userName;
		this.password = password;
	}
	
	public LoginModel(LoginModel model) {
		super();
		this.userName = model.getUserName();
		this.password = model.getPassword();
	}
}
